/********************************************************************

Define pointer exceptions.

Write Date: 2011/07/16
Author: Deng Nianchen
>>>> The file contains following classes:
>>>> PtrException
>>>> --> NullPtrException

Modify Date: 2015/08/17
Author: Apple
>>>> Update the code and comment style
>>>> Rename PtrExceptions.hpp to PtrExceptions.h to match the file naming
     convention.

*********************************************************************/
#pragma once
#include "OOPException.h"



_NS_OOP_BEGIN



/**
 * Exception for signalling general pointer errors.
 *
 * @remarks 2011/3/24, Apple
 */
class PtrException: public OOPException
{
public:

    virtual QString getReson () const throw () {
        return "Unknown Ptr exception.";
    }

};



/**
 * Exception for signalling null pointer errors.
 *
 * @remarks 2011/3/24, Apple
 */
class NullPtrException : public PtrException
{
public:

    virtual QString getReson () const throw () {
        return "The Ptr points to null.";
    }

};



_NS_OOP_END